﻿using FastCloud.Base.Desgin;
using FastORM.Entity;
using System;
using System.Collections.Generic;
using System.Reflection;
using System.Text;

namespace FastCloud.Base.Config
{
    public class CacheContext
    {
        public static void Init()
        {
            List<Type> CacheTypeList = InjectContext.GetRegistType(typeof(BaseCacheML<>));
            foreach (Type item in CacheTypeList)
            {
                MethodInfo method = item.GetMethod("InitCache", new Type[] { });
                object obj = InjectContext.Resolve(item);
                object[] parameters = new object[] { };
                method.Invoke(obj, parameters);
            }
        }

    }
}
